ifndef XPKIT
XPKIT=/usr/local/xpkit
endif

SRCS=\
	Main.m Globals.m MainApp.m 
OBJS=$(SRCS:.m=.o)
OUT=app

CFLAGS=-I$(XPKIT) -O2 -Wall 
LDFLAGS=\
	-L$(XPKIT)/xp/bas \
	-L$(XPKIT)/xp/net \
	-L$(XPKIT)/xp/utl \
	-L$(XPKIT)/xpo/bas \
	-L$(XPKIT)/xpo/net
LIBS=-lobjc -lrt -lnsl -lpthread -lxponet -lxpobas -lxputl -lxpnet -lxpbas 

all: $(OBJS)
	$(CC) $(LDFLAGS) -o $(OUT) $(OBJS) $(LIBS) 

clean:
	rm -rf *.o $(OUT)

.SUFFIXES: .m .o
.m.o:
	$(CC) -c $(CFLAGS) $<

